from todo_api_project.BASE.myBase import Tools



class register_module(Tools):
    path = '/user/register'

    def register_action(self,username,password,cpassword,email,checkcode='1234'):
        data = {
            'username': username,
            'password': password,
            'cpassword': cpassword,
            'checkcode': checkcode,
            'email': email
        }
        res = self.session.post(url=self.hosturl+self.path,data=data).json()
        return res
